package top.lingchen.webfluxdemo2.service;

import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
import top.lingchen.webfluxdemo2.entity.User;


/**
 * @Author 凌宸
 * @create 2021-12-01 下午 5:56
 * @Description
 * @Version 1.0
 */
public interface UserService {

    // 根据 id 查询用户
    Mono<User> getUserById(int id);

    // 查询所有用户
    Flux<User> getAllUsers();

    // 添加用户
    Mono<Void> saveUserInfo(Mono<User> user);
}
